import React, { Component } from 'react'
import './index.css'

export default class List extends Component {
    render() {
        const { userInfo } = this.props;
        console.log(userInfo);
        return (
            <div className="row">
                {
                    userInfo.map(item => {
                        const { avatar_url, id, html_url, login } = item;
                        return (
                            <div  key={id} className="card">
                                <a rel="noreferrer" href={html_url} target="_blank">
                                    <img src={avatar_url} style={{ width: "100px" }} alt='avatar' />
                                </a>
                                <p className="card-text">{login}</p>
                            </div>
                        )
                    })

                }

            </div>
        )
    }
}
